package view;

import java.awt.Toolkit;
import javax.swing.*;

/**
 *
 * @author Sonny Sandberg
 */
public class Main
{
    public static void main(String[] args)
    {    
        // Define mainFrame
        JFrame mainFrame = new JFrame();
        mainFrame.setTitle("Project Flintstone");
        mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        mainFrame.setResizable(false);
        view.ViewSingleton.getSingletonObject().setMainFrame(mainFrame);

        Toolkit tk = Toolkit.getDefaultToolkit();
        int screenWidth = tk.getScreenSize().width;
        int screenHeight = tk.getScreenSize().height;

        ViewHandler.initAllViews();
        ViewHandler.addAllViewsToMainFrame();

        ViewHandler.toggleAllsView("login", true);

        mainFrame.setBounds(((screenWidth - 1100) / 2), (screenHeight - 935) / 2, 1100, 935);
        mainFrame.setVisible(true);
    }
}
